package week2;
import java.util.Scanner;
import java.util.Arrays;


public class week2_04 
{
	public static void main(String[] args) 
	{
		while(true)
		{
			Scanner sc = new Scanner(System.in);
			int n = sc.nextInt();
			String[][] str = getDynamicMatrix(n);
			for(int i=1;i<=n;i++)
			{
				for(int j=1;j<=i;j++)
				{
					str[i-1][j-1]=i+"*"+j+"="+(i*j);
					if(j==i)
						System.out.printf("%s"+"\n",str[i-1][j-1]);
					else
						System.out.printf("%-7s",str[i-1][j-1]);
				}
			}
			System.out.println(Arrays.deepToString(str));
		}
	}

	private static String[][] getDynamicMatrix(int n) 
	{
		String[][] strs = new String[n][];
		for (int i = 0; i < n; i++) 
			strs[i] = new String[i+1];
		return strs;
	}
}

